#pragma once


#include <string>


class Parser
{
public:
	Parser(void);
	~Parser(void);

public:
	//for serviceInfo response
	LRESULT FindServiceProvider(const std::wstring& src,std::wstring& result);
	LRESULT FindServiceUri(const std::wstring& src,std::wstring& result);
	LRESULT FindSignUpPage(const std::wstring& src,std::wstring& result);
	LRESULT FindLocalName(const std::wstring& src,std::wstring& result);
	LRESULT FindSMSmaxRecipientsPerMessage(const std::wstring& src, std::wstring& result);
	LRESULT FindSMSmaxMessagesPerSend(const std::wstring& src, std::wstring& result);
	LRESULT FindSMSmaxSbcsPerMessage(const std::wstring& src, std::wstring& result);
	LRESULT FindSMSmaxDbcsPerMessage(const std::wstring& src, std::wstring& result);

	//for userInfo response
	LRESULT FindUserInfoErrorCode(const std::wstring& src,std::wstring& result);
	LRESULT FindUserReplyPhone(const std::wstring& src,std::wstring& result);
	LRESULT FindUserSmtpAddress(const std::wstring& src,std::wstring& result);

	//for send response
	LRESULT FindSendResponseErrorCode(const std::wstring& src,std::wstring& result);
	LRESULT FindSendResponseUnreachedReceiver(const std::wstring& src,std::wstring& result);
	LRESULT FindSendResponseUnreachedContent(const std::wstring& src,std::wstring& result);
private:
	//for <serviceProvider>...</serviceProvider>
	LRESULT FindElementValueInternal(const std::wstring& src,const std::wstring& startTag,const std::wstring& endTag ,std::wstring& result);
	//for <serviceProvider xxx="ff" ...>
	LRESULT FindElementAttribute(const std::wstring& src,const std::wstring& elementName,const std::wstring& attributeName,std::wstring& result);
};

